﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="Admin_Modules_Options_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="/Admin/css/Site.css" rel="stylesheet" type="text/css" />
    <link href="/Admin/css/themes/metroblue/jquery-ui.css" rel="stylesheet" type="text/css" />

    <!-- jTable style file -->
    <link href="/Admin/js/jtable/themes/metro/blue/jtable.css" rel="stylesheet" type="text/css" />

    <script src="/Admin/js/jqueryjtable/modernizr-2.6.2.js" type="text/javascript"></script>
    <script src="/Admin/js/jqueryjtable/jquery-1.9.0.min.js" type="text/javascript"></script>
    <script src="/Admin/js/jqueryjtable/jquery-ui-1.9.2.min.js" type="text/javascript"></script>

    <script src="/Admin/js/jqueryjtable/jtablesite.js" type="text/javascript"></script>

    <!-- A helper library for JSON serialization -->
    <script type="text/javascript" src="/Admin/js/jtable/external/json2.js"></script>
    <!-- Core jTable script file -->
    <script type="text/javascript" src="/Admin/js/jtable/jquery.jtable.js"></script>
    <!-- ASP.NET Web Forms extension for jTable -->
    <script type="text/javascript" src="/Admin/js/jtable/extensions/jquery.jtable.aspnetpagemethods.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="c" runat="Server">
    <div class="site-container">
        <div id="StudentTableContainer"></div>
    </div>
    <script type="text/javascript">

        $(document).ready(function () {

            //Prepare jtable plugin
            $('#StudentTableContainer').jtable({
                title: 'Danh sách thiết lập',
                paging: true,
                pageSize: 100,
                sorting: true,
                defaultSorting: 'Name ASC',
                actions: {
                    listAction: 'Default.aspx/OptionList',
                    createAction: 'Default.aspx/CreateOption',
                    updateAction: 'Default.aspx/UpdateOption'
                    //, deleteAction: 'Default.aspx/DeleteOption'
                },
                fields: {
                    Id: {
                        key: true,
                        create: false,
                        edit: false,
                        list: false
                    },
                    Name: {
                        title: 'Khóa truy xuất',
                        sorting: true
                    },
                    Value: {
                        title: 'Giát rị',
                        list: true
                    },
                    Description: {
                        title: 'Mô tả chi tiết',
                        list: true
                    }
                }
            });

            //Load student list from server
            $('#StudentTableContainer').jtable('load');
        });

    </script>
    <a target="_blank" href="/ClearCache.ashx?key=SystemOption">Clear Cache</a>
</asp:Content>
